<template>
	<view class="contact">
		<image src="http://www.itcast.cn/2018czydz/images/gywmban.jpg" mode=""></image>
		<view class="info">
			<view class="" @click="clickPhone">
				联系电话: 155-4905-7495 ( 点击拨打 )
			</view>
			<view class="">
				校区地址: 湖北省武汉市洪山区关东街道南湖康泰花园海棠苑
			</view>
		</view>

		<map :latitude="latitude" :longitude="longitude" :markers="markers"></map>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 经纬度, 通过百度地图api来获取 114.38826,30.502077
				latitude: 30.502077,
				longitude: 114.38826,
				// 地图上的图标 
				markers: [{
					latitude: 30.502077,
					longitude: 114.38826,
					iconPath: '../../static/hmlogo.png',
					winth: 30,
					height: 35
				}]

			}
		},
		methods: {
			// 点击拨打电话 调用api
			clickPhone() {
				uni.makePhoneCall({
				    phoneNumber: '15549057495' //仅为示例
				});
			}
		}
	}
</script>

<style lang="scss">
	.contact {
		image {
			width: 750rpx;
			height: 360rpx;
		}

		.info {
			padding: 10rpx 20rpx;
			font-size: 30rpx;

			view {
				line-height: 60rpx;
				border-bottom: 1px solid #eee;
			}
		}

		map {
			width: 750rpx;
			height: 500rpx;
		}
	}
</style>
